290        Bioinformatics

the consensus taxonomy at a given taxonomic level. Consensus is determined at each tax-

onomic level, beginning from kingdom and stopping when consensus is no longer met

above a specified minimum consensus value. Then, the taxonomy is trimmed at this point.

To use an alignment-based classifier, you need to download, extract, and import a rep-

resentative sequence database and reference taxonomy database as shown above in the de

novo clustering section. The following script imports “99_otus.fasta” and “99_otu_taxon-

omy.txt” reference database from Greensgenes into QIIME2 artifacts, which will be saved

in the “input” subdirectory. To keep the files organized, we will create the “taxonomy”

subdirectory to store the taxonomy files.

mkdir taxonomy

qiime tools import \

--type ‘FeatureData[Sequence]’ \

--input-path gg_13_8_otus/rep_set/99_otus.fasta \

--output-path taxonomy/99_otus.qza

qiime tools import \

--type ‘FeatureData[Taxonomy]’ \

--input-format HeaderlessTSVTaxonomyFormat \

--input-path gg_13_8_otus/taxonomy/99_otu_taxonomy.txt \

--output-path taxonomy/99_otu_taxonomy.qza

Now, you can run taxonomy classification using the BLAST-based classifier (classify-

consensus-blast). The inputs are any representative sequence artifact (generated by any

of the clustering methods or denoising methods), the reference sequence artifact, and

the reference taxonomy artifact imported in the previous step. The following script uses

BLAST-based classifier to assign taxa to the representative sequences generated by DADA2

denoising:

qiime feature-classifier classify-consensus-blast \

--i-query dada2/rep-seqs_yoga_dada2.qza \

--i-reference-reads taxonomy/99_otus.qza \

--i-reference-taxonomy taxonomy/99_otu_taxonomy.qza \

--p-perc-identity 0.97 \

--o-classification taxonomy/blast_tax_yoga_dada2.qza \

--verbose

If you wish to use the VSEARCH-based method instead, you can use “classify-consensus-

vsearch” methods.

qiime feature-classifier classify-consensus-vsearch \

--i-query dada2/rep-seqs_yoga_dada2.qza \

--i-reference-reads taxonomy/99_otus.qza \

--i-reference-taxonomy taxonomy/99_otu_taxonomy.qza \

--p-perc-identity 0.97 \

--o-classification taxonomy/vsearch_tax_yoga_dada2.qza \

--verbose